Machine Learning for Hackers by White John & Conway Drew

Machine Learning for Hackers by White John & Conway Drew

Author:White, John & Conway, Drew [White, John]
Language: eng
Format: epub
Tags: 技术
Publisher: WhoEver
Published: 2012-02-12T16:00:00+00:00


Introducing Polynomial Regression

With our earlier caveats in mind, let’s start working with polynomial regression in R, which is implemented in the poly function. The easiest way to see how poly works is to build up from a simple example and show what happens as we give our model more expressive power to mimic the structure in our data.

We’ll use a sine wave to create a data set in which the relationship between x and y could never be described by a simple line.

set.seed(1)

x <- seq(0, 1, by = 0.01)

y <- sin(2 * pi * x) + rnorm(length(x), 0, 0.1)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.